﻿<%@ Page Title="All Posts" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MyBBS.Views.Post.Index" %>
<%@ Import Namespace="MyBBS.Controllers.ViewData" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
<div class="selector" id="selector">
    <a class="tool" href="/all/popular/365days">365 Days</a>
    <a class="tool" href="/all/popular/30days">30 Days</a>
    <a class="tool" href="/all/popular/7days">7 Days</a>
    <a class="tool" href="/all/popular/24hours">Top in 24 Hr</a>
    <span class="tool">
        <strong>Most Recent</strong>
    </span>
    <h2>All Posts</h2>
</div>
<%= Html.RenderUserControl("~/Views/Shared/PostList.ascx", ViewData.Model.PostsUserInfo) %>
<div class="pager">
    <span style="display:<%=((ViewData.Model.PostsUserInfo.PostList.IsPreviousPage) ? string.Empty : "none")%>">
        <%= Html.ActionLink<PostController>(p => p.Index((ViewData.Model.PostsUserInfo.PostList.PageIndex ?? 0) - 1), "上一页")%>&nbsp;
    </span>
    <span style="display:<%=((ViewData.Model.PostsUserInfo.PostList.IsNextPage) ? string.Empty : "none")%>">
        <%= Html.ActionLink<PostController>(p => p.Index((ViewData.Model.PostsUserInfo.PostList.PageIndex ?? 0) + 1), "下一页")%>
    </span>
</div>
</asp:Content>
